import request from "@/utils/request";

// 查询法律法规管理分页列表
export function listLaws(query){
  return request({
    url: '/flfg/lawsRegulationsManagement/list',
    method: 'get',
    params: query
  })
}

// 根据id查询某个法律法规管理的信息 用在修改之前
export function getlaws(lawsRegulationsManagementId){
  return request({
    url: '/flfg/lawsRegulationsManagement/' + lawsRegulationsManagementId,
    method: 'get'
  })
}


// 新增或者修改法律法规管理
export function addOrUpdateLaws(data){
  return request({
    url: '/flfg/lawsRegulationsManagement',
    method: 'post',
    data: data
  })
}

// 查询辨识人列表
export function getUserList(query){
  return request({
    url: '/flfg/lawsRegulationsManagement/userList',
    method: 'get',
    params: query
  })
}
//
// // 查询法律法规分类对应的编号
// export function getNumber(query){
//   return request({
//     url: '/flfg/lawsRegulationsManagement/getNumer',
//     method: 'get',
//     params: query
//   })
// }

// 查询所有的法律法规分类
export function getclassificationMap(){
  return request({
    url: '/flfg/lawsRegulationsManagement/classificationMap',
    method: 'get'
  })
}

// 查询部门列表
export function getDeptList(query){
  return request({
    url: '/flfg/lawsRegulationsManagement/deptList',
    method: 'get',
    params: query
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}
//
// // 查询所有的部门
// export function getDeptNameMap(){
//   return request({
//     url: '/flfg/lawsRegulationsManagement/deptNameMap',
//     method: 'get'
//   })
// }

// 批量删除法律法规管理
export function delLaws(lawsRegulationsManagementIds){
  return request({
    url: '/flfg/lawsRegulationsManagement/' + lawsRegulationsManagementIds,
    method: 'delete'
  })
}

// 文件上传
export function uploadAvatar(data){
  return request({
    url: '/flfg/lawsRegulationsManagement/avatar',
    method: 'post',
    data: data
  })
}
